package my.soft.aiteacher.teacher.controller;

import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import jakarta.annotation.Resource;
import my.soft.aiteacher.teacher.pojo.VideoInformationType;
import my.soft.aiteacher.teacher.service.IControlService;
import my.soft.aiteacher.utils.R;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/control")
@Tag(name="教师-视频解析管理")

public class ControlController {
    @Resource
    private IControlService controlService;
    @PreAuthorize("hasAnyAuthority('query:videoInformationType')")
    @RequestMapping(value = "/detail/{fileId}",method = RequestMethod.GET)
    @Operation(summary = "获取详情")
    public R detail(@PathVariable Long fileId){
        VideoInformationType videoInformationType = controlService.detail(fileId);
        return R.success(videoInformationType);
    }
}
